<template>
  <div>
    <h2>商品详情</h2>
    <!-- 商品详情 -->
    <img :src="goods.img1">
    <p>商品名称：{{goods.proname}}</p>
    <p>商品价格：{{goods.originprice}}</p>
    <p>品牌：{{goods.brand}}</p>
    <p>销量：{{goods.sales}}</p>    

  </div>
</template>

<script>
// import axios from "axios";

export default {
    name:"GoodsDetail",
    props:["goodsid"],
    data(){
        return {
            goods:{},
            comments:[]
        }
    },
    created(){
        // console.log("this.$router",this.$router);
        // console.log("this.$route",this.$route);

        // let proid = this.$route.params.goodsid
        let proid = this.goodsid

        
        this.$service.get("api/pro/detail/"+proid)
        .then(res=>{
            if(res.data.code==200){
                console.log("商品详情：",res.data.data);
                this.goods = res.data.data;
            }
        })        
     
    }
}
</script>

<style>

</style>